<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:ser="http://schemas.microsoft.com/2003/10/Serialization/" xmlns:tns="http://schemas.datacontract.org/2004/07/MiniStock.Entities.Stock" elementFormDefault="qualified" targetNamespace="http://schemas.datacontract.org/2004/07/MiniStock.Entities.Stock" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:import schemaLocation="http://localhost:999/query?xsd=xsd3" namespace="http://schemas.datacontract.org/2004/07/MiniStock.Entities.Common" />
  <xs:import schemaLocation="http://localhost:999/query?xsd=xsd1" namespace="http://schemas.microsoft.com/2003/10/Serialization/" />
  <xs:complexType name="Customer">
    <xs:complexContent mixed="false">
      <xs:extension xmlns:q1="http://schemas.datacontract.org/2004/07/MiniStock.Entities.Common" base="q1:EntityBase">
        <xs:sequence>
          <xs:element minOccurs="0" name="ContactPerson" nillable="true" type="tns:ContactPerson" />
          <xs:element minOccurs="0" name="HQAddress" nillable="true" type="tns:Address" />
          <xs:element minOccurs="0" name="Name" nillable="true" type="xs:string" />
          <xs:element minOccurs="0" name="Orders" nillable="true" type="tns:ArrayOfOrder" />
          <xs:element minOccurs="0" name="ShippingAddress" nillable="true" type="tns:Address" />
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="Customer" nillable="true" type="tns:Customer" />
  <xs:complexType name="Product">
    <xs:complexContent mixed="false">
      <xs:extension xmlns:q2="http://schemas.datacontract.org/2004/07/MiniStock.Entities.Common" base="q2:EntityBase">
        <xs:sequence>
          <xs:element minOccurs="0" name="Description" nillable="true" type="xs:string" />
          <xs:element minOccurs="0" name="Manufacturer" nillable="true" type="tns:Customer" />
          <xs:element minOccurs="0" name="ManufacturerId" nillable="true" type="ser:guid" />
          <xs:element minOccurs="0" name="Name" nillable="true" type="xs:string" />
          <xs:element minOccurs="0" name="OrderItems" nillable="true" type="tns:ArrayOfOrderItem" />
          <xs:element minOccurs="0" name="ProductNumber" nillable="true" type="xs:string" />
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="Product" nillable="true" type="tns:Product" />
  <xs:complexType name="ArrayOfOrderItem">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="unbounded" name="OrderItem" nillable="true" type="tns:OrderItem" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="ArrayOfOrderItem" nillable="true" type="tns:ArrayOfOrderItem" />
  <xs:complexType name="OrderItem">
    <xs:complexContent mixed="false">
      <xs:extension xmlns:q3="http://schemas.datacontract.org/2004/07/MiniStock.Entities.Common" base="q3:EntityBase">
        <xs:sequence>
          <xs:element minOccurs="0" name="Amount" type="xs:decimal" />
          <xs:element minOccurs="0" name="OrderId" type="ser:guid" />
          <xs:element minOccurs="0" name="Product" nillable="true" type="tns:Product" />
          <xs:element minOccurs="0" name="ProductId" type="ser:guid" />
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="OrderItem" nillable="true" type="tns:OrderItem" />
  <xs:complexType name="Order">
    <xs:complexContent mixed="false">
      <xs:extension xmlns:q4="http://schemas.datacontract.org/2004/07/MiniStock.Entities.Common" base="q4:EntityBase">
        <xs:sequence>
          <xs:element minOccurs="0" name="Customer" nillable="true" type="tns:Customer" />
          <xs:element minOccurs="0" name="CustomerId" type="ser:guid" />
          <xs:element minOccurs="0" name="Items" nillable="true" type="tns:ArrayOfOrderItem" />
          <xs:element minOccurs="0" name="OrderDeadline" nillable="true" type="xs:dateTime" />
          <xs:element minOccurs="0" name="OrderReceived" nillable="true" type="xs:dateTime" />
          <xs:element minOccurs="0" name="OrderShipped" nillable="true" type="xs:dateTime" />
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="Order" nillable="true" type="tns:Order" />
  <xs:complexType name="ContactPerson">
    <xs:complexContent mixed="false">
      <xs:extension base="tns:Person">
        <xs:sequence>
          <xs:element minOccurs="0" name="Email" nillable="true" type="xs:string" />
          <xs:element minOccurs="0" name="Phone" nillable="true" type="xs:string" />
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="ContactPerson" nillable="true" type="tns:ContactPerson" />
  <xs:complexType name="Person">
    <xs:sequence>
      <xs:element minOccurs="0" name="FirstName" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" name="LastName" nillable="true" type="xs:string" />
    </xs:sequence>
    <xs:attribute ref="ser:Id" />
    <xs:attribute ref="ser:Ref" />
  </xs:complexType>
  <xs:element name="Person" nillable="true" type="tns:Person" />
  <xs:complexType name="Address">
    <xs:sequence>
      <xs:element minOccurs="0" name="City" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" name="State" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" name="StreetName" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" name="StreetNumber" nillable="true" type="xs:string" />
    </xs:sequence>
    <xs:attribute ref="ser:Id" />
    <xs:attribute ref="ser:Ref" />
  </xs:complexType>
  <xs:element name="Address" nillable="true" type="tns:Address" />
  <xs:complexType name="ArrayOfOrder">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="unbounded" name="Order" nillable="true" type="tns:Order" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="ArrayOfOrder" nillable="true" type="tns:ArrayOfOrder" />
  <xs:complexType name="ArrayOfCustomer">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="unbounded" name="Customer" nillable="true" type="tns:Customer" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="ArrayOfCustomer" nillable="true" type="tns:ArrayOfCustomer" />
  <xs:complexType name="ArrayOfProduct">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="unbounded" name="Product" nillable="true" type="tns:Product" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="ArrayOfProduct" nillable="true" type="tns:ArrayOfProduct" />
</xs:schema>